//
//  LSZMemberInformationViewController.m
//  PartyClassCloud
//
//  Created by 梁素珍 on 2018/11/29.
//  Copyright © 2018年 九酷. All rights reserved.
//

#import "LSZMemberInformationViewController.h"

@interface LSZMemberInformationViewController ()<UITableViewDelegate,UITableViewDataSource>
@property(nonatomic,strong) UITableView * tableViewMemberInformation;
@property(nonatomic,strong) NSArray * arrayTitleArray;
@end

@implementation LSZMemberInformationViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = self.inquiryPoorHouseholdsMg.name;
    self.arrayTitleArray = @[@"性别",@"性别",@"年龄",@"证件号",@"与户主关系",@"在校状况",@"健康状况",@"务工时长",@"政治面貌",@"文化程度",@"劳动能力",@"务工状况",@"是否参加新型医疗合作社",@"是否现役军人",@"是否享受低保",@"是否参加大病医疗保险",@"帮扶方式",@"务工企业名称",@"联系方式",@"正常显示",@"信息变动类别",@"信息变动原因"];
    [self.tableViewMemberInformation registerNib:[UINib nibWithNibName:@"LSZOrSoTableViewCell" bundle:nil] forCellReuseIdentifier:@"LSZOrSoTableViewCell"];
}
- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.arrayTitleArray.count;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 45;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
    return 0.001;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
    return 0.001;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    LSZOrSoTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"LSZOrSoTableViewCell" forIndexPath:indexPath];
    cell.leftLabel.text = self.arrayTitleArray[indexPath.row];
    switch (indexPath.row) {
        case 0:
            {
                cell.rightBut.text = self.inquiryPoorHouseholdsMg.name;
            }
            break;
        case 1:
        {
            cell.rightBut.text = @"";
        }
            break;
        case 2:
        {
            cell.rightBut.text = @"";
        }
            break;
        case 3:
        {
            cell.rightBut.text = self.inquiryPoorHouseholdsMg.idNumber;
        }
            break;
        case 4:
        {
            cell.rightBut.text = self.inquiryPoorHouseholdsMg.relation;
        }
            break;
        case 5:
        {
            cell.rightBut.text = self.inquiryPoorHouseholdsMg.school;
        }
            break;
        case 6:
        {
            cell.rightBut.text = self.inquiryPoorHouseholdsMg.health;
        }
            break;
        case 7:
        {
            cell.rightBut.text = self.inquiryPoorHouseholdsMg.workTime;
        }
            break;
        case 8:
        {
            cell.rightBut.text = @"";
        }
            break;
        case 9:
        {
            cell.rightBut.text = self.inquiryPoorHouseholdsMg.degree;
        }
            break;
        case 10:
        {
            cell.rightBut.text = self.inquiryPoorHouseholdsMg.ability;
        }
            break;
        case 11:
        {
            cell.rightBut.text = self.inquiryPoorHouseholdsMg.work;
        }
            break;
        case 12:
        {
            cell.rightBut.text = self.inquiryPoorHouseholdsMg.medical;//医保
        }
            break;
        case 13:
        {
            cell.rightBut.text = @"";
        }
            break;
        case 14:
        {
            cell.rightBut.text = self.inquiryPoorHouseholdsMg.povertyStatus;
        }
            break;
        case 15:
        {
            cell.rightBut.text = @"";
        }
            break;
        case 16:
        {
            cell.rightBut.text = self.inquiryPoorHouseholdsMg.health;
        }
            break;
        case 17:
        {
            cell.rightBut.text = @"";
        }
            break;
        case 18:
        {
            cell.rightBut.text = self.inquiryPoorHouseholdsMg.contactPhone;
        }
            break;
        case 19:
        {
            cell.rightBut.text = @"";
        }
            break;
        case 20:
        {
            cell.rightBut.text = @"";
        }
            break;
        case 21:
        {
            cell.rightBut.text = @"";
        }
            break;
        default:
            break;
    }
    return cell;
}
-(UITableView *)tableViewMemberInformation
{
    if (_tableViewMemberInformation == nil) {
        _tableViewMemberInformation = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width , [[UIScreen mainScreen] bounds].size.height) style:UITableViewStyleGrouped];
        _tableViewMemberInformation.delegate = self;
        _tableViewMemberInformation.dataSource = self;
        _tableViewMemberInformation.estimatedRowHeight=0;
        _tableViewMemberInformation.estimatedSectionFooterHeight =0;
        _tableViewMemberInformation.estimatedSectionHeaderHeight =0;
        [_tableViewMemberInformation setSeparatorInset:UIEdgeInsetsMake(0, 20, 0, 20)];
        [self.view addSubview:_tableViewMemberInformation];
    }
    return _tableViewMemberInformation;
}


@end
